//
//  WPHomeEditeCollectionCellCollectionViewCell.m
//  wobingwoyi
//
//  Created by WGP on 16/8/11.
//  Copyright © 2016年 WGP. All rights reserved.
//

#import "WPHomeEditeCollectionCell.h"

@interface WPHomeEditeCollectionCell ()

@property(nonatomic,strong)UIImageView *iconView;

@end
@implementation WPHomeEditeCollectionCell

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        self.iconView = [[UIImageView alloc] init];
        self.iconView.contentMode = UIViewContentModeScaleAspectFill;
        self.iconView.clipsToBounds = YES;
        [self.contentView addSubview:self.iconView];
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    CGRect frame = self.bounds;
    
    frame.origin = CGPointMake(2, 2);
    frame.size = CGSizeMake(frame.size.width-4, frame.size.height-4);
    
    self.iconView.frame = frame;
}

-(void)setLittleImage:(UIImage *)littleImage
{
    _littleImage = littleImage;
    self.iconView.image = littleImage;
}

@end
